package com.idea.errorcode.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author: 沉香
 * @date: 2025/04/13
 * @description: 异常码文档静态资源映射
 */
@Configuration
public class ErrorCodeWebConfig implements WebMvcConfigurer {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/error-codes/**")
                .addResourceLocations("classpath:/static/error-codes.html");
    }
}